<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Acesso</title>
        <ui:include src="/WEB-INF/partials/layout/admin/includes.xhtml" />  
    </h:head>
    <h:body onload="document.formLogin.j_username.focus();">


        <h:panelGroup rendered="#{!empty param.login_error}">
            <span style="color: red;">
                Erro ao efetuar o login.
                <br/>
                <br/>
                Motivo: #{SPRING_SECURITY_LAST_EXCEPTION.message}
            </span>
        </h:panelGroup>


        <form id="formLogin" method="post" action="#{request.contextPath}/j_spring_security_check">
            <table border="0"
                   class="table-login"
                   align="center"
                   cellspacing="5"
                   cellpadding="2"
                   width="380">
                <tr>
                    <td>
                        Login *:
                    </td>
                    <td>
                        <input type="text" name="j_username"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        Senha *:
                    </td>
                    <td>
                        <input type="password" name="j_password" />
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <input type="checkbox" name="_spring_security_remember_me"/>
                    </td>
                    <td>
                        Entrar automaticamente
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <input type="submit" value="Entrar" style="width: 63%"/>
                    </td>
                </tr>
            </table>

            <script>
                document.getElementById("formLogin").j_username.value = "#{SPRING_SECURITY_LAST_USERNAME}";
            </script>

        </form>



    </h:body>














</html>

